package com.huang.juctool.CountDown;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;

public class CountDownLatchDeam {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        CountDownLatch count = new CountDownLatch(3);
        for (int i = 1; i <=3; i++) {
            new Thread(()->{
                System.out.println(Thread.currentThread().getName()+"我走了");
                count.countDown();

            },Enum.getInstance(i).getName()).start();
        }
        count.await();//  剪刀0  执行后面
        System.out.println("我锁门了 。。。。");
    }
}
